#pragma once

#include <bonddict/IBondDict.h>

#include "IMainFrame.h"

class QString;
class QJsonObject;
class S_GUIFRAME_EXPORT IApplication {
 public:
  virtual int run() = 0;
  virtual IMainFrame* mainFrame() const = 0;
  virtual int /*error_code*/ execCommand(int cmd, const char* parameters) = 0;
  virtual int /*error_code*/ execCommand(const QString* cmd_name,
                                         const QJsonObject* parameters) = 0;
  virtual float uiScale() = 0;
};

extern "C" S_GUIFRAME_EXPORT IApplication* getAppInstance(
    int argc = 0, char* argv[] = nullptr);
extern "C" S_GUIFRAME_EXPORT void releaseApp();
#define sApp getAppInstance()
